Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

Spg update #574

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Spg update #574

wants to merge 11 commits into from

Conversation

c-mita
Copy link
Contributor

@c-mita c-mita commented Feb 24, 2017

Updates scan point generator to a more recent work-in-progress version and
makes any changes required as a result of minor interface changes.

@c-mita
Copy link
Contributor Author

c-mita commented Feb 24, 2017

This pull request is only here to trigger the travis-ci build. Please do not merge this branch or use it as the base for any other commits - expect frequent rebasing.

return new Point(m.group(4), Integer.parseInt(m.group(5)), Double.parseDouble(m.group(6)),
m.group(1), Integer.parseInt(m.group(2)), Double.parseDouble(m.group(3)));
}
throw new RuntimeException("Unparsable string" + asString);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

@@ -133,4 +135,21 @@ public int getIndex(String name) {
}
return indices;
}

private static final String VERTEX = "([a-zA-Z0-9_])+\\((\\d+)\\)=([-+]?[0-9]*\\.?[0-9]+)";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Move this variable to comply with Java Code Conventions. rule

@@ -133,4 +135,21 @@ public int getIndex(String name) {
}
return indices;
}

private static final String VERTEX = "([a-zA-Z0-9_])+\\((\\d+)\\)=([-+]?[0-9]*\\.?[0-9]+)";
private static final Pattern POSITION = Pattern.compile(VERTEX + ", " + VERTEX);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Move this variable to comply with Java Code Conventions. rule

@gerring
Copy link
Contributor

gerring commented Feb 28, 2017

SonarQube analysis reported 3 issues

  • MAJOR 1 major
  • MINOR 2 minor

Watch the comments in this conversation to review them.

Generators now need to be accessed through compound generator.

CompoundGenerator needs to have its prepare method called.

generator.num has been renamed to generator.size

Comment out/pass over ArrayGenerator code for the moment, as it is not
available in scanpointgenerator right now (it will be restored soon).
generator.names has been renamed to generator.axes

generator.num has been renamed to generator.size

Units given to generators now need to be an array matching the length of
the given axes array.

The random offset algorithm has changed, and value comparisons need to
be updated.
@gerring
Copy link
Contributor

gerring commented Mar 1, 2017

Please put your changes on the 'regions' branch as instructed. The Java changes there are required.

@gerring gerring closed this Mar 1, 2017
@gerring gerring reopened this Mar 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants